package jp.co.rc.entity;

import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.*;
import java.io.Serializable;

@Data
public class User implements Serializable {

    @Max(value = 10000, message = "最大10000")
    @Min(value = 1, message = "最小1")
    @NotNull(message = "不能为空")
    private Long id;

    @NotBlank(message = "不能为空")
    @Size(max = 16, min = 6, message = "字符串长度需要在6-16之间")
    private String name;

    @NotBlank(message = "不能为空")
    @Size(max = 18, min = 6, message = "字符串长度需要在6-18之间")
    private String password;

    @NotBlank(message = "不能为空")
    private String createTime;

    @NotBlank(message = "不能为空")
    private String contant;
}